﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PFI.ADCConv;
using PFI.DAConv;
using PFI.SCHVN;
using PFI.RegisterDevice;
using Utils.RamDevice;

namespace Algorithm.CalibrationWeights
{
    public class CalibratorOfCletchingCombinations
    {
        /*
        ADC adcInst;
        public CalibratorOfCletchingCombinations(ADC adcInst)
        {
            this.adcInst = adcInst;
        }
        public double GetAkal(int i)
        {
            return adcInst.dac.schvn.GetBitIdeal(i) * (1 + adcInst.dac.schvn.delta / 100);
        }
        public void CalibrateCletchingCombinations()
        {
            RAM.CletchingCombinations.ClearCletchingCombinations();
            int kilToch = adcInst.dac.schvn.kilTochnux;

            for (int ik = kilToch; ik < adcInst.dac.schvn.n; ik++)
            {
                Register reg1 = adcInst.SARAnalogSignal(GetAkal(ik)).Clone();
                Register reg2 = adcInst.SARAnalogSignal(GetAkal(ik), ik).Clone();
                int[] pol1 = reg1.polinom.Clone() as int[];
                int[] pol2 = reg2.polinom.Clone() as int[];
                RAM.CletchingCombinations.AddCletchingCombinationUp(adcInst.dac.ZnachenyaR(reg2), pol1);
                RAM.CletchingCombinations.AddCletchingCombinationDown(adcInst.dac.ZnachenyaR(reg1), pol2);
            }
        }*/
    }
}
